/**
 * Created by Administrator on 2017/7/17.
 */
//var id2=document.getElementsByClassName("yin")[0];
//function _over(){
//            id2.style.display = "block";
//}
//function _out(){
//    id2.style.display = "none";
//}
var yin=document.getElementsByClassName("yin");
function _over(con){
 for(var i=0;i<yin.length;i++){
     if(con==i){
         yin[i].style.display = "block";
     }else{
         yin[i].style.display = "none";
     }
 }
}

function _out(cons){
    for(var j=0;j<yin.length;j++){
        yin[j].style.display = "none";
    }
}


var qian=document.getElementsByClassName("qian")[0];
var lis=document.getElementsByClassName("lis");
var i = 0;
function _change(){
    qian.style.backgroundImage=_img[i];
    for(var j=0; j<lis.length;j++){
        if(i==j){
            lis[j].style.backgroundColor="white";
        }else{
            lis[j].style.backgroundColor="";
        }
    }
    i++;
    if(i==_img.length){
        i=0;
    }
    dsq=window.setTimeout(_change,2000);
}
_change();
function _stop(con){
    i = con;
    window.clearTimeout(dsq);
    for(var j=0;j<lis.length;j++){
        if(con==j){
            lis[j].style.backgroundColor="white";
        }else{
            lis[j].style.backgroundColor="";
        }
    }
    qian.style.backgroundImage=_img[con];
}